import request from '@/utils/request'

// 适老化产品的查询
export function getSuitElderlyProductData(data){
    return request({
        url:"/pk-retirement/base-setting/elderly-oriented-product/list",
        method:"get",
        params:data
    })
}

// 拿到设备类型的数据
export function getDeviceTypeData(){
    return request({
        url:"/pk-iot/iot/devicetype/list",
        method:"get",
        params:{page:1,limit:100}
    })
}

// 拿到设备型号的数据
// export function getDeviceModelData(){
//     return request({
//         url:"pk-iot/iot/devicemodel/list",
//         method:"get",
//         params:{page:1,limit:100}

//     })
// }

// 新增适老化产品
export function addNewSuitElderlyProductData(data){
    return request({
        url:"/pk-retirement/base-setting/elderly-oriented-product/save",
        method:"post",
        data:data
    })
}

// 删除适老化产品
export function deleteSuitElderlyProductData(data){
    return request({
        url:"/pk-retirement/base-setting/elderly-oriented-product/delete",
        method:"delete",
        data:data
    })
}

// 修改适老化产品
export function editSuitElderlyProductData(data){
    return request({
        url:"/pk-retirement/base-setting/elderly-oriented-product/update",
        method:"put",
        data:data
    })
}

// 用于智能化改造-查询设备类型
export function getDeviceTypeArr(){
    return request({
        url:"/pk-iot/iot/devicetype/getDeviceTypeList",
        method:"get",
    })
}

// 根据设备类型的的选中拿到设备型号的数据
export function getDeviceModelArr(data){
    return request({
        url:`/pk-iot/iot/devicemodel/getModelList/${data}`,
        method:"get",
    })
}